<?php /* Smarty version 2.6.19, created on 2008-06-15 23:22:07
         compiled from ../templates/global/editor.tpl */ ?>
<div id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-wrapper" class="lbp-editor-wrapper not-installed">
	<div id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-toolbar" class="editor-toolbar pkg not-ready">
		<?php if ($this->_tpl_vars['editor']->options['use_format']): ?>
		<div class="select-group pkg">
			<div class="ed-dropdown">
		    <select id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-format" class="editor-format toolbar-select">
		        <option value="H1">Heading 1</option>
		        <option value="H2">Heading 2</option>
		        <option value="H3">Heading 3</option>
		        <option value="H4">Heading 4</option>
		        <option value="H5">Heading 5</option>
		        <option value="H6">Heading 6</option>
		    </select>
		    </div>
		</div>
		<?php endif; ?>
		<?php if ($this->_tpl_vars['editor']->options['use_fontface']): ?>
		<div class="select-group pkg">
			<div class="ed-dropdown">
		    <select id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-fontface" class="editor-fontface toolbar-select">
		        <option value="arial">Arial</option>
		        <option value="tahoma">Tahoma</option>
		        <option value="times new roman">Times</option>
		        <option value="Verdana">Verdana</option>
		    </select>
		    </div>
		</div>
		<?php endif; ?>
		<?php if ($this->_tpl_vars['editor']->options['use_fontsize']): ?>
		<div class="select-group pkg">
			<div class="ed-dropdown">
		    <select id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-fontsize" class="editor-fontsize toolbar-select">
		        <option value="1">1</option>
		        <option value="2">2</option>
		        <option value="3">3</option>
		        <option value="4">4</option>
		        <option value="5">5</option>
		        <option value="6">6</option>
		        <option value="7">7</option>
		    </select>
		    </div>
		</div>
		<?php endif; ?>
	    <div class="toolbar-group pkg">
			<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-bold" class="editor-bold toolbar-button" title="Định dạng đoạn text được đánh dấu thành chữ đậm">Đậm</button>
			<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-italic" class="editor-italic toolbar-button" title="Định dạng đoạn text được đánh dấu thành chữ nghiêng">Nghiêng</button>
			<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-strikethrough" class="editor-strikethrough toolbar-button" title="Định dạng đoạn text được đánh dấu thành gạch ngang">Gạch ngang</button>
		</div>

		<div class="toolbar-group pkg">
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-createlink" class="editor-createlink toolbar-button" title="Tạo liên kết từ đoạn text đánh dấu">Liên kết</button>
		    <?php if ($this->_tpl_vars['editor']->options['use_image']): ?>
			<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-insertimage" class="editor-insertimage toolbar-button" title="Chèn ảnh">Ảnh</button>
			<?php endif; ?>
		</div>

		<?php if ($this->_tpl_vars['editor']->options['use_color']): ?>
		<div class="toolbar-group pkg">
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-textcolor" class="editor-textcolor toolbar-button toolbar-color-button" title="Đổi màu chữ của đoạn text được đánh dấu">Đổi màu</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-highlightcolor" class="editor-highlightcolor toolbar-button toolbar-color-button" title="Đánh dấu màu cho đoạn text">Đánh dấu</button>
		</div>
		<?php endif; ?>

		<?php if ($this->_tpl_vars['editor']->options['use_list']): ?>
		<div class="toolbar-group pkg">
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-insertunorderedlist" class="editor-insertunorderedlist toolbar-button" title="Tạo danh sách chấm">Bullet</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-insertorderedlist" class="editor-insertorderedlist toolbar-button" title="Tạo danh sách số">Number</button>
	    </div>
	    <?php endif; ?>

	    <?php if ($this->_tpl_vars['editor']->options['use_align']): ?>
	    <div class="toolbar-group pkg">
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-justifyleft" class="editor-justifyleft toolbar-button" title="Căn lề trái">Justify Left</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-justifyright" class="editor-justifyright toolbar-button" title="Căn lề phải">Justify Right</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-justifycenter" class="editor-justifycenter toolbar-button" title="Căn lề giữa">Justify Center</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-justifyfull" class="editor-justifyfull toolbar-button" title="Căn lề đều">Justify Full</button>
	    </div>
	    <?php endif; ?>

	    <div class="toolbar-group pkg">
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-formatquote" class="editor-formatquote toolbar-button" title="Trích dẫn">Format Quote</button>
		    <?php if ($this->_tpl_vars['editor']->options['use_float']): ?>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-formatfloatleft" class="editor-formatfloatleft toolbar-button" title="Trôi trái">Format Float Left</button>
		    <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-formatfloatright" class="editor-formatfloatright toolbar-button" title="Trôi phải">Format Float Right</button>
		    <?php endif; ?>
	    </div>

	    <div class="toolbar-group pkg">
    		<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-removeformat" class="editor-removeformat toolbar-button" title="Xóa định dạng">Xóa</button>
    		<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-toggleview" class="editor-toggleview toolbar-button" title="Bật/Tắt chế độ HTML">HTML</button>
	    </div>

	    <div class="toolbar-group pkg">
			<?php if ($this->_tpl_vars['editor']->options['use_count']): ?>
			<button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-countchar" class="editor-countchar toolbar-button">Count Char</button>
			<?php endif; ?>
            <?php if ($this->_tpl_vars['editor']->options['use_help']): ?>
            <button id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-help" class="editor-help toolbar-button">Help</button>
            <?php endif; ?>
		</div>
	</div>
	<div id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-container" class="editor-container not-ready">
		<div class="top"><div class="top-inner"></div></div>
		<div class="content"><div class="content-inner">
			<textarea class="editor not-ready" name="<?php echo $this->_tpl_vars['editor']->options['textarea_name']; ?>
" id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
"><?php echo $this->_tpl_vars['editor']->value; ?>
</textarea>
		</div></div>
		<div class="bottom"><div class="bottom-inner"></div></div>
	</div>
	<?php if ($this->_tpl_vars['editor']->options['use_resize']): ?>
	<div class="editor-resizer-wrapper">
		<div id="<?php echo $this->_tpl_vars['editor']->options['id']; ?>
-resizer" class="editor-resizer-normal not-ready"></div>
	</div>
	<?php endif; ?>
</div>

<script type="text/javascript">
var build_<?php echo $this->_tpl_vars['editor']->options['id']; ?>
_fnc = function(){
    <?php echo $this->_tpl_vars['editor']->options['id']; ?>
_editor = new DCEditor(
		$('<?php echo $this->_tpl_vars['editor']->options['id']; ?>
'),
		{
            use_format:		<?php if ($this->_tpl_vars['editor']->options['use_format']): ?>true<?php else: ?>false<?php endif; ?>,
			use_fontface:	<?php if ($this->_tpl_vars['editor']->options['use_fontface']): ?>true<?php else: ?>false<?php endif; ?>,
			use_fontsize:	<?php if ($this->_tpl_vars['editor']->options['use_fontsize']): ?>true<?php else: ?>false<?php endif; ?>,
			use_image:		<?php if ($this->_tpl_vars['editor']->options['use_image']): ?>true<?php else: ?>false<?php endif; ?>,
			use_color:		<?php if ($this->_tpl_vars['editor']->options['use_color']): ?>true<?php else: ?>false<?php endif; ?>,
			use_list:		<?php if ($this->_tpl_vars['editor']->options['use_list']): ?>true<?php else: ?>false<?php endif; ?>,
			use_align:		<?php if ($this->_tpl_vars['editor']->options['use_align']): ?>true<?php else: ?>false<?php endif; ?>,
			use_float:		<?php if ($this->_tpl_vars['editor']->options['use_float']): ?>true<?php else: ?>false<?php endif; ?>,
			use_resize:		<?php if ($this->_tpl_vars['editor']->options['use_resize']): ?>true<?php else: ?>false<?php endif; ?>,
			use_help:		<?php if ($this->_tpl_vars['editor']->options['use_help']): ?>true<?php else: ?>false<?php endif; ?>,
			help_link:		'<?php echo $this->_tpl_vars['editor']->options['help_link']; ?>
',
			help_caller:	'<?php echo $this->_tpl_vars['editor']->options['help_caller']; ?>
',
			max_length:		<?php echo $this->_tpl_vars['editor']->options['max_length']; ?>
,
			CSSFileURL: 	'<?php echo $this->_tpl_vars['editor']->options['css_url']; ?>
'
		}
	);
	window.removeEvent('domready', build_<?php echo $this->_tpl_vars['editor']->options['id']; ?>
_fnc);
};
window.addEvent('domready', build_<?php echo $this->_tpl_vars['editor']->options['id']; ?>
_fnc);
</script>

<?php echo '
<script type="text/javascript">
	/*window.addEvent(\'domready\', function(){
		var lsl = new lbp_selectbox({
            wrapperName: \'ed-dropdown\',
            selectOverlayID: \'ed-select-overlay\',
			selectBoxClassName: \'ed-select-box\',
			selectListClassName: \'ed-select-list\',
			selectItemClassName: \'ed-select-list-item\',
			selectBoxWidthDiff: 16,
			selectListWidthDiff: 8,
			maxItems: 5
		});
	});*/
</script>
'; ?>